package com.virus.mall.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Classname PropertiesUtils
 * @Description NULL
 * @Date 2021/4/22 11:17
 * @Created by virus
 */
public class PropertiesUtils {

    private static final String PROPERTIES = "application.properties";

    private static final String DOMAIN_KEY = "domain";

    public static final String DOMAIN;

    private static final String NO_IMG_KEY = "noImg";

    public static final String NO_IMG;

    static {
        Properties properties = new Properties();
        InputStream is = PropertiesUtils.class.getClassLoader().getResourceAsStream(PROPERTIES);
        try {
            properties.load(is);
        } catch (IOException e) {
            e.printStackTrace();
        }
        DOMAIN = properties.getProperty(DOMAIN_KEY);
        NO_IMG = properties.getProperty(NO_IMG_KEY);
    }
}
